package com.lier.common.constant;

import lombok.Getter;

/**
 * @author liyd
 * @description 商品系统常量
 * @date 2025/6/12 11:39
 */
public class ProductConstant {


    @Getter
    public enum AttrEnum {
        /**
         * 基本属性
         */
        ATTR_TYPE_BASE(1, "基本属性", "base"),
        /**
         * 销售属性
         */
        ATTR_TYPE_SALE(0, "销售属性", "sale");
        ;

        private final int code;
        private final String desc;
        private final String type;

        AttrEnum(int code, String desc, String type) {
            this.code = code;
            this.desc = desc;
            this.type = type;
        }

    }

    public enum StatusEnum {
        /**
         * 新建
         */
        NEW_SPU(0, "商品新建"),
        SPU_UP(1, "商品上架"),
        SPU_DOWN(2, "商品下架")
        ;

        private final int code;
        private final String msg;

        StatusEnum(int code, String msg) {
            this.code = code;
            this.msg = msg;
        }

        public int getCode() {
            return code;
        }

        public String getMsg() {
            return msg;
        }

    }
}
